package com.dream.jump.retrofit

import com.dream.jump.entity.Result
import com.dream.jump.entity.model.UserFunction
import com.dream.jump.entity.model.LoggedInUser
import com.dream.jump.entity.model.LoginParam
import com.dream.jump.entity.model.OrderType
import retrofit2.http.*

interface RetrofitApi {
    @POST("/api/wap/v3/mobile/user/login")
    suspend fun login(@Body loginParam: LoginParam): Result<LoggedInUser>

    @GET("/api/wap/v2/mobile/update/configure/check")
    suspend fun loadFunction(
        @Header("Token") token: String,
        @Query(value = "userId") userId: Int
    ): Result<Array<UserFunction>>

    @GET("/api/ws/v1/types")
    suspend fun loadOrderTypes(
        @Header("Token") token: String,
        @Query(value = "operateCode") operateCode: String
    ): Result<Array<OrderType>>
}